<%--
  Created by IntelliJ IDEA.
  User: ASUS
  Date: 2018/7/10
  Time: 11:09
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>课程表管理</title>
    <jsp:include page="/static/common/easyui_header.jsp"></jsp:include>
    <script src="/static/js/views/schedule.js"></script>
</head>
<body>

<div id="cc" class="easyui-layout" fit="true">
    <div id="west" data-options="region:'west',split:true,title:''" style="width: 200px;height:480px" >
        <div id="cc2" class="easyui-layout" style="height: 460px">
            <div id="south" data-options="region:'south',split:true,title:'日期查询',collapsible:false" style="height: 250px">
                <div id="calendar" class="easyui-calendar" fit="true"></div>
            </div>
            <div id="north" data-options="region:'north',split:true,title:'课表查询',collapsible:false" style="height: 200px">
                <%--<tr>--%>
                <%--<td>--%>
                <%--<input id="btn_classgrade" class="easyui-combobox"--%>
                <%--data-options="width:'150px',url:'/classgrade/listAllClassGradeJson',valueField:'id',textField:'name',prompt:'班级',panelHeight:'auto',onSelect: function(rec){--%>
                <%--var url = '/classroom/queryRoomByClassId.do?id='+rec.id;--%>
                <%--$('#btn_classroom').combobox('clear');--%>
                <%--$('#btn_classroom').combobox('reload', url);--%>
                <%--},onUnselect:function(){--%>
                <%--var url = '/classroom/listActiveRoom.do';--%>
                <%--$('#btn_classroom').combobox('clear');--%>
                <%--$('#btn_classroom').combobox('reload', url);--%>
                <%--}"--%>
                <%--name="classId">--%>
                <%--</td>--%>
                <%--</tr>--%>
                <tr>
                    <td>
                        <input id="btn_classgrade" class="easyui-combobox"
                               data-options="url:'/classgrade/listAllClassGradeJson',valueField:'id',textField:'name',panelHeight:'auto',prompt:'班级'"
                               name="classId">
                    </td>
                </tr>
                <tr>
                    <td>
                        <input id="btn_classroom" class="easyui-combobox"
                               data-options="url:'/classroom/listAll',valueField:'id',textField:'name',panelHeight:'auto',prompt:'教室'"
                               name="roomId">
                    </td>
                </tr>
                <tr>
                    <td>
                        <input id="btn_teacher" class="easyui-combobox"
                               data-options="prompt:'老师',url:'/employee/listAllEmployeeBySn?sn=TEACH',valueField:'id',textField:'realName',panelHeight:'auto'"
                               name="teacherId">
                    </td>
                </tr>
                <tr>
                    <td>
                        <input id="btn_beginDate" type="text" class="easyui-datebox" name="beginDate"
                               data-options="width:'150px'"/>
                    </td>
                </tr>
                <tr>
                    <td style="text-align: center">~</td>
                </tr>
                <tr>
                    <td>
                        <input type="text" class="easyui-datebox"
                               name="endDate" id="btn_endDate" data-options="width:'150px'"/>
                    </td>
                </tr>
                <tr>
                    <td>
                        <a class="easyui-linkbutton" iconCls="icon-see" plain="true" data-cmd="searchForSchedule">查询</a>
                    </td>
                </tr>

            </div>

        </div>
    </div>
    <div data-options="region:'center'" fit="true">
        <table id="schedule_datagrid"></table>
        <div id="schedule_toolbar">
            <a class="easyui-linkbutton" iconCls="icon-add" plain="true" data-cmd="addSchedule">增加课程</a>
            <a class="easyui-linkbutton" iconCls="icon-edit" plain="true" data-cmd="editSchedule">编辑课程</a>
            <a class="easyui-linkbutton" iconCls="icon-remove" plain="true" data-cmd="removeSchedule">取消课程</a>
            <a class="easyui-linkbutton" iconCls="icon-export" plain="true" data-cmd="exportSchedule">导出课程</a>
            <a class="easyui-linkbutton" iconCls="icon-import" plain="true" data-cmd="importSchedule">导入课程</a>
            <a class="easyui-linkbutton" iconCls="icon-reload" plain="true" data-cmd="reloadSchedule">刷新</a>
        </div>
        <div id="schedule_add_linkbuttons">
            <a class="easyui-linkbutton" data-options="iconCls:'icon-ok'" data-cmd="save">确定</a>
            <a class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" data-cmd="cancel">取消</a>
        </div>
        <div id="schedule_add_dialog" style="padding: 10px">
            <form id="schedule_add_form" method="post">
                <input type="hidden" name="id" id="schedule_id">
                <table>
                    <tr>
                        <td>课程名称</td>
                        <td><input name="subject" class="easyui-textbox"></td>
                    </tr>
                    <tr>
                        <td>课程时间</td>
                        <td><input name="subDate" class="easyui-datebox" required="required"> </input> </td>
                    </tr>
                    <tr>
                        <td>上课班级</td>
                        <td><input class="easyui-combobox" name="classgrade.id"
                                   data-options="valueField:'id',textField:'name',url:'/classgrade/listAllClassGradeJson'"/>
                        </td>
                    </tr>
                    <tr>
                        <td>上课教师</td>
                        <td><input class="easyui-combobox" name="teacher.id"
                                   data-options="valueField:'id',textField:'realName',url:'/employee/listAllEmployeeBySn?sn=TEACH'"/>
                        </td>
                    </tr>
                    <tr>
                        <td>班主任</td>
                        <td><input class="easyui-combobox" name="coordinator.id"
                                   data-options="valueField:'id',textField:'realName',url:'/employee/listAllEmployeeBySn?sn=CLZMGR'"/>
                        </td>
                    </tr>
                    <tr>
                        <td>使用教室</td>
                        <td><input id="combobox_classroom" class="easyui-combobox" name="classroom.id"
                                   data-options="valueField:'id',textField:'name',url:'/classroom/listAllClassroomExStatus'"/></td>
                    </tr>
                    <tr>
                        <td>摘要</td>
                        <td><input name="remark" class="easyui-textbox"></td>
                    </tr>
                </table>
            </form>
        </div>
    </div>
</div>
<div id="schedule_import">
    <form id="import_form" method="post" enctype="multipart/form-data">
        <table>
            <tr>
                课程表上传:<input id="schedule_xls" name="file" class="easyui-filebox" style="width:200px"
                             data-options="accept:'application/vnd.ms-excel',multiple:false,buttonText:'请选择要上传的课程表'"><br>
            </tr>
            <tr>
                <a id="download" class="easyui-linkbutton" iconCls="icon-redo" plain="true" data-cmd="download">模板下载</a>
                <a class="easyui-linkbutton" iconCls="icon-save" plain="true" data-cmd="upload">上传</a>
                <a class="easyui-linkbutton" iconCls="icon-undo" plain="true" data-cmd="undo">取消</a>
            </tr>
        </table>
    </form>
</div>

</body>
</html>
